﻿import * as sfs from "fs";
import * as q from 'q';
import { AppContext } from "../appContext";
import { readdirSync, readFileSync } from "fs";
import { sep, join } from "path";

export class Server {
    init() {
        var files = readdirSync(AppContext.typescriptSdkPath).filter(x => x.endsWith(".d.ts")).map(x => {
            return {
                path: join(AppContext.typescriptSdkPath, x),
                content: readFileSync(join(AppContext.typescriptSdkPath, x), "utf8")
            }
        });
        return {
            platform: process.platform,
            files: files,
            sep: sep
        }
    }
}